import { defineStore } from 'pinia';

const useLayoutStore = defineStore('layout', {
    state: () => {
        return {
            //  设置菜单是否收缩
            menuCollapsed: false,
            //  设置是否暗黑模式
            themeState: false
        };
    },
    actions: {
        menuTrigger() {
            this.menuCollapsed = !this.menuCollapsed;
        },
        themeStyle(){
            this.themeState = !this.themeState;
        },
    },
});

export default useLayoutStore;
